// 引入组件
import login from '@/components/business/login.vue'
import register from '@/components/business/register.vue'
import BusinessIndex from '@/components/business/index.vue'
import BusinessProfile from '@/components/business/profile.vue'

// 定义一个路由列表(子路由)
const list = [
    { path: 'login', name: 'login', component: login },
    { path: 'register', name: 'register', component: register },
    {
        path: 'index',
        name: 'BusinessIndex',
        component: BusinessIndex,
        meta: { IsLogin: true }
    },
    {
        path: 'profile',
        name: 'BusinessProfile',
        component: BusinessProfile,
        meta: { IsLogin: true }
    },
]

// 父级的组件模板
const layout = {
    template: `<router-view />`
}

export default [
    {
        path: '/business',      // 一级路由地址
        name: 'business',
        component: layout,
        children: list
    }
]